import pymongo

if __name__ == "__main__":
    conn = pymongo.MongoClient('localhost', 27017)
    db = conn['Prometheus']
    collec_music = db['musics']
    collec_rss = db['rss']
    music = collec_music.find({}).sort("_id", 1).limit(10)
    rss = collec_rss.find({'type': 'rss'}).sort("usersCount", -1).limit(10)
    print 'music:', music[1]
    print 'rss', rss[1]
